.class Lcom/xingbook/audio/activity/q;
.super Landroid/os/Handler;


# instance fields
.field private a:Ljava/lang/ref/WeakReference;


# direct methods
.method public constructor <init>(Lcom/xingbook/audio/activity/MyAudioActivity;)V
    .locals 1

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/xingbook/audio/activity/q;->a:Ljava/lang/ref/WeakReference;

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 10

    const/4 v9, 0x1

    const/16 v8, 0x50

    const/16 v7, 0x40

    const/4 v3, 0x0

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/xingbook/audio/activity/q;->a:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/audio/activity/MyAudioActivity;

    if-nez v0, :cond_0

    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    :goto_0
    return-void

    :cond_0
    iget v2, p1, Landroid/os/Message;->what:I

    packed-switch v2, :pswitch_data_0

    :cond_1
    :goto_1
    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    goto :goto_0

    :pswitch_0
    iget v2, p1, Landroid/os/Message;->arg1:I

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->b(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/d;

    move-result-object v3

    invoke-virtual {v3}, Lcom/xingbook/park/c/a/d;->getSelectedIndex()I

    move-result v3

    if-ne v2, v3, :cond_1

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->j(Lcom/xingbook/audio/activity/MyAudioActivity;)Landroid/widget/LinearLayout;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->removeAllViews()V

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->f(Lcom/xingbook/audio/activity/MyAudioActivity;)Landroid/widget/ListView;

    move-result-object v2

    invoke-virtual {v2, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->k(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/ui/p;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/xingbook/park/ui/p;->a(Ljava/lang/String;)V

    goto :goto_1

    :pswitch_1
    iget v1, p1, Landroid/os/Message;->arg1:I

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->b(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/d;

    move-result-object v2

    invoke-virtual {v2}, Lcom/xingbook/park/c/a/d;->getSelectedIndex()I

    move-result v2

    if-ne v1, v2, :cond_1

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->k(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/ui/p;

    move-result-object v1

    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Ljava/lang/String;

    invoke-virtual {v1, v0}, Lcom/xingbook/park/ui/p;->b(Ljava/lang/String;)V

    goto :goto_1

    :pswitch_2
    iget v2, p1, Landroid/os/Message;->arg1:I

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->b(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/d;

    move-result-object v4

    invoke-virtual {v4}, Lcom/xingbook/park/c/a/d;->getSelectedIndex()I

    move-result v4

    if-ne v2, v4, :cond_4

    if-ne v2, v9, :cond_8

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->g(Lcom/xingbook/audio/activity/MyAudioActivity;)Ljava/util/LinkedHashMap;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/LinkedHashMap;->size()I

    move-result v2

    if-lez v2, :cond_6

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->e(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/a;

    move-result-object v2

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->g(Lcom/xingbook/audio/activity/MyAudioActivity;)Ljava/util/LinkedHashMap;

    move-result-object v4

    invoke-virtual {v4}, Ljava/util/LinkedHashMap;->keySet()Ljava/util/Set;

    move-result-object v4

    invoke-virtual {v2, v4, v3}, Lcom/xingbook/park/c/a/a;->a(Ljava/util/Set;I)V

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->g(Lcom/xingbook/audio/activity/MyAudioActivity;)Ljava/util/LinkedHashMap;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/LinkedHashMap;->size()I

    move-result v2

    if-le v2, v9, :cond_2

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->j(Lcom/xingbook/audio/activity/MyAudioActivity;)Landroid/widget/LinearLayout;

    move-result-object v2

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->e(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/a;

    move-result-object v4

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    :cond_2
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->i(Lcom/xingbook/audio/activity/MyAudioActivity;)I

    move-result v2

    invoke-static {v7, v2}, Lcom/xingbook/c/t;->a(II)Z

    move-result v2

    if-eqz v2, :cond_5

    const-string v1, "\u66f4\u591a\u7cbe\u5f69\uff0c\u70b9\u51fb\u8fdb\u5165\u300e\u661f\u5b9d\u513f\u6b4c\u300f\u770b\u770b\u5427~"

    :cond_3
    :goto_2
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->h(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/b;

    move-result-object v2

    invoke-virtual {v2}, Lcom/xingbook/audio/a/b;->n()Lcom/xingbook/park/c/a/o;

    move-result-object v2

    invoke-virtual {v2, v3, v1}, Lcom/xingbook/park/c/a/o;->a(ZLjava/lang/String;)V

    :goto_3
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->f(Lcom/xingbook/audio/activity/MyAudioActivity;)Landroid/widget/ListView;

    move-result-object v1

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->h(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/b;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    :cond_4
    :goto_4
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->k(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/ui/p;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/park/ui/p;->b()V

    goto/16 :goto_1

    :cond_5
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->i(Lcom/xingbook/audio/activity/MyAudioActivity;)I

    move-result v2

    invoke-static {v8, v2}, Lcom/xingbook/c/t;->a(II)Z

    move-result v2

    if-eqz v2, :cond_3

    const-string v1, "\u66f4\u591a\u7cbe\u5f69\uff0c\u70b9\u51fb\u8fdb\u5165\u300e\u661f\u5b9d\u542c\u542c\u300f\u770b\u770b\u5427~"

    goto :goto_2

    :cond_6
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->i(Lcom/xingbook/audio/activity/MyAudioActivity;)I

    move-result v2

    invoke-static {v7, v2}, Lcom/xingbook/c/t;->a(II)Z

    move-result v2

    if-eqz v2, :cond_7

    const-string v2, "\u6ca1\u6709\u5185\u5bb9\u54e6,\u70b9\u51fb\u8fdb\u5165\u300e\u661f\u5b9d\u513f\u6b4c\u300f\u770b\u770b\u5427~"

    :goto_5
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->h(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/b;

    move-result-object v4

    invoke-virtual {v4}, Lcom/xingbook/audio/a/b;->n()Lcom/xingbook/park/c/a/o;

    move-result-object v4

    invoke-virtual {v4, v3, v2}, Lcom/xingbook/park/c/a/o;->a(ZLjava/lang/String;)V

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->h(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/b;

    move-result-object v2

    const/4 v3, -0x1

    invoke-virtual {v2, v1, v3, v1, v1}, Lcom/xingbook/audio/a/b;->a(Ljava/util/ArrayList;ILjava/lang/String;Ljava/lang/String;)V

    goto :goto_3

    :cond_7
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->i(Lcom/xingbook/audio/activity/MyAudioActivity;)I

    move-result v2

    invoke-static {v8, v2}, Lcom/xingbook/c/t;->a(II)Z

    move-result v2

    if-eqz v2, :cond_11

    const-string v2, "\u6ca1\u6709\u5185\u5bb9\u54e6,\u70b9\u51fb\u8fdb\u5165\u300e\u661f\u5b9d\u542c\u542c\u300f\u770b\u770b\u5427~"

    goto :goto_5

    :cond_8
    if-nez v2, :cond_4

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->c(Lcom/xingbook/audio/activity/MyAudioActivity;)Ljava/util/LinkedHashMap;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/LinkedHashMap;->size()I

    move-result v2

    if-lez v2, :cond_d

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->d(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/d;

    move-result-object v2

    invoke-virtual {v2}, Lcom/xingbook/audio/a/d;->h()Z

    move-result v4

    if-eqz v4, :cond_10

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->e(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/a;

    move-result-object v2

    invoke-virtual {v2}, Lcom/xingbook/park/c/a/a;->getTagSize()I

    move-result v2

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->c(Lcom/xingbook/audio/activity/MyAudioActivity;)Ljava/util/LinkedHashMap;

    move-result-object v5

    invoke-virtual {v5}, Ljava/util/LinkedHashMap;->size()I

    move-result v5

    if-ne v5, v2, :cond_10

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->e(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/a;

    move-result-object v2

    invoke-virtual {v2}, Lcom/xingbook/park/c/a/a;->getSelectedIndex()I

    move-result v2

    :goto_6
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->e(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/a;

    move-result-object v5

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->c(Lcom/xingbook/audio/activity/MyAudioActivity;)Ljava/util/LinkedHashMap;

    move-result-object v6

    invoke-virtual {v6}, Ljava/util/LinkedHashMap;->keySet()Ljava/util/Set;

    move-result-object v6

    invoke-virtual {v5, v6, v2}, Lcom/xingbook/park/c/a/a;->a(Ljava/util/Set;I)V

    if-eqz v4, :cond_b

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->j(Lcom/xingbook/audio/activity/MyAudioActivity;)Landroid/widget/LinearLayout;

    move-result-object v2

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->l(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/d/a;

    move-result-object v4

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->l(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/d/a;

    move-result-object v2

    invoke-virtual {v2}, Lcom/xingbook/audio/d/a;->a()V

    :cond_9
    :goto_7
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->i(Lcom/xingbook/audio/activity/MyAudioActivity;)I

    move-result v2

    invoke-static {v7, v2}, Lcom/xingbook/c/t;->a(II)Z

    move-result v2

    if-eqz v2, :cond_c

    const-string v1, "\u66f4\u591a\u7cbe\u5f69\uff0c\u70b9\u51fb\u8fdb\u5165\u300e\u661f\u5b9d\u513f\u6b4c\u300f\u770b\u770b\u5427~"

    :cond_a
    :goto_8
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->d(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/d;

    move-result-object v2

    invoke-virtual {v2}, Lcom/xingbook/audio/a/d;->n()Lcom/xingbook/park/c/a/o;

    move-result-object v2

    invoke-virtual {v2, v3, v1}, Lcom/xingbook/park/c/a/o;->a(ZLjava/lang/String;)V

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->m(Lcom/xingbook/audio/activity/MyAudioActivity;)Landroid/widget/TextView;

    move-result-object v1

    invoke-virtual {v1, v3}, Landroid/widget/TextView;->setVisibility(I)V

    :goto_9
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->f(Lcom/xingbook/audio/activity/MyAudioActivity;)Landroid/widget/ListView;

    move-result-object v1

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->d(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/d;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    goto/16 :goto_4

    :cond_b
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->c(Lcom/xingbook/audio/activity/MyAudioActivity;)Ljava/util/LinkedHashMap;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/LinkedHashMap;->size()I

    move-result v2

    if-le v2, v9, :cond_9

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->j(Lcom/xingbook/audio/activity/MyAudioActivity;)Landroid/widget/LinearLayout;

    move-result-object v2

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->e(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/park/c/a/a;

    move-result-object v4

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    goto :goto_7

    :cond_c
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->i(Lcom/xingbook/audio/activity/MyAudioActivity;)I

    move-result v2

    invoke-static {v8, v2}, Lcom/xingbook/c/t;->a(II)Z

    move-result v2

    if-eqz v2, :cond_a

    const-string v1, "\u66f4\u591a\u7cbe\u5f69\uff0c\u70b9\u51fb\u8fdb\u5165\u300e\u661f\u5b9d\u542c\u542c\u300f\u770b\u770b\u5427~"

    goto :goto_8

    :cond_d
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->i(Lcom/xingbook/audio/activity/MyAudioActivity;)I

    move-result v2

    invoke-static {v7, v2}, Lcom/xingbook/c/t;->a(II)Z

    move-result v2

    if-eqz v2, :cond_e

    const-string v2, "\u6ca1\u6709\u5185\u5bb9\u54e6,\u70b9\u51fb\u8fdb\u5165\u300e\u661f\u5b9d\u513f\u6b4c\u300f\u770b\u770b\u5427~"

    :goto_a
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->d(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/d;

    move-result-object v4

    invoke-virtual {v4}, Lcom/xingbook/audio/a/d;->n()Lcom/xingbook/park/c/a/o;

    move-result-object v4

    invoke-virtual {v4, v3, v2}, Lcom/xingbook/park/c/a/o;->a(ZLjava/lang/String;)V

    invoke-virtual {v0, v3}, Lcom/xingbook/audio/activity/MyAudioActivity;->a(Z)V

    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->d(Lcom/xingbook/audio/activity/MyAudioActivity;)Lcom/xingbook/audio/a/d;

    move-result-object v2

    const/4 v3, -0x1

    invoke-virtual {v2, v1, v3, v1, v1}, Lcom/xingbook/audio/a/d;->a(Ljava/util/ArrayList;ILjava/lang/String;Ljava/lang/String;)V

    goto :goto_9

    :cond_e
    invoke-static {v0}, Lcom/xingbook/audio/activity/MyAudioActivity;->i(Lcom/xingbook/audio/activity/MyAudioActivity;)I

    move-result v2

    invoke-static {v8, v2}, Lcom/xingbook/c/t;->a(II)Z

    move-result v2

    if-eqz v2, :cond_f

    const-string v2, "\u6ca1\u6709\u5185\u5bb9\u54e6,\u70b9\u51fb\u8fdb\u5165\u300e\u661f\u5b9d\u542c\u542c\u300f\u770b\u770b\u5427~"

    goto :goto_a

    :cond_f
    move-object v2, v1

    goto :goto_a

    :cond_10
    move v2, v3

    goto/16 :goto_6

    :cond_11
    move-object v2, v1

    goto/16 :goto_5

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method
